#ifndef __OLED_H
#define __OLED_H

#include <unistd.h>
#include "stdio.h"

#include "ohos_init.h"
#include "cmsis_os2.h"

#include "wifiiot_errno.h"
#include "wifiiot_gpio.h"
#include "wifiiot_gpio_ex.h"
#include "wifiiot_i2c.h"
#include "wifiiot_i2c_ex.h"

#include "oledfont.h"

#define OLED_MODE 0
#define SIZE 16
#define XLevelL		0x00
#define XLevelH		0x10
#define Max_Column	128
#define Max_Row		64
#define	Brightness	0xFF 
#define X_WIDTH 	128
#define Y_WIDTH 	64	    


//#define OLED_CMD  0	//写命令
//#define OLED_DATA 1	//写数据

/*************定义OLED使用的IIC************/
#define SSD1306_I2C_IDX WIFI_IOT_I2C_IDX_0

#define SSD1306_I2C_ADDR        (0x3C << 1)

#define OLED_I2C_BAUDRATE 400*1000

typedef enum
{
	OLED_CMD = 0,   //写命令
	OLED_DATA       //写数据
}OLED_WR_MODE;


#define u8 unsigned char
#define u16 unsigned short
#define u32 unsigned int

#endif